import {ipcMain} from "electron";
import {lcuServerManager} from "@/main/lcu/LcuServierManager.js";
import store, {store_field_lcu_certificate} from "@/main/store/store.js";


//渲染进程/主进程双向通信事件

/***代理服务信息***/
ipcMain.handle('proxy-server/baseUrl', (event, arg) => {
    return `http://127.0.0.1:${store.get(`${store_field_lcu_certificate}.proxyPort`)}`
});
/**LCU服务状态**/
ipcMain.handle('lcu-server/status/pull', (event, arg) => {
    return {
        'connectStatus': lcuServerManager.connectStatus,
    }
})
// 环境信息
ipcMain.handle('evn/getEnv', (event, env) => {
    return process.env[env];
})
